Winnovative Software Logo Winnovative PDF Library for .NET – Next and Classic PDF Tools for .NET
HTML to PDF for .NET Core and Framework, Azure, Docker, Windows, Linux
 
Skip Navigation Links
 
In the code samples below you can see how the merge library is used to combine PDF documents, images, texts and HTML into a single PDF document.

C# Code Sample - PDF Merge

1:           PdfDocumentOptions pdfDocumentOptions = new PdfDocumentOptions();
2:  
3:           pdfDocumentOptions.PdfCompressionLevel = PDFCompressionLevel.Normal;
4:           pdfDocumentOptions.PdfPageSize =  PdfPageSize.A4;
5:           pdfDocumentOptions.PdfPageOrientation = PDFPageOrientation.Portrait;
6:  
7:           PDFMerge pdfMerge = new PDFMerge(pdfDocumentOptions);
8:  
9:           pdfMerge.AppendPDFFile(pdfFilePath);
10:          pdfMerge.AppendImageFile(imageFilePath);
11:          pdfMerge.AppendTextFile(textFilePath);
12:          pdfMerge.AppendEmptyPage();
13:          
14:  
15:          pdfMerge.SaveMergedPDFToFile(outFile);